import React, { Component } from 'react'
import { connect } from 'react-redux'
import { bindActionCreators} from 'redux'
import * as actions from "../store/action"

export class Tcon extends Component {
  render() {
      const {children}=this.props
    return (
      <div>
        <ul> {
             children ?
             children.map((item,index)=>{
                  return <li>{item.title}</li>
              }):"暂无数据"
          }</ul> 
      </div>
    )
  }
}

const mapStateToProps = (state) => ({
    ...state.reduce
})

const mapDispatchToProps = (dispatch)=>{
    return bindActionCreators(actions,dispatch)

}

export default connect(mapStateToProps, mapDispatchToProps)(Tcon)